<script>
import SuperTable from './components/super-table.vue'
export default {
  functional: true,
  render(createElement,context){
    let superTableKey = 1
    let selectionRowCache = new Map()
    const props = context.props
    const resizeHandler = function(){
      if(superTableKey >= 9999) superTableKey = 1
      else superTableKey++
    }
    window.addEventListener('resize',resizeHandler,false)
    context.data.on['hook:destroyed'] = function(){
      window.removeEventListener('resize',resizeHandler,false)
    }
    props.selectionRowCache = selectionRowCache
    return createElement(
      SuperTable,
      {
        key: superTableKey,
        ...context.data,
      },
      context.children
    )
  }
}
</script>

<style>

</style>
